package experiment6_2;

public class MyThread  implements Runnable{
	protected String strThreadName;
	protected ContentShare contentShare;
	
	public MyThread(String strThreadName, ContentShare contentShare){
		this.strThreadName = strThreadName;
		this.contentShare = contentShare;
	}
	
	public void run(){
		synchronized(contentShare){
			System.out.println("The name of thread is " + this.strThreadName + 
					" and the content of thread is " + this.contentShare.getContent());
		}
	}
}
